CC=/usr/local/arm/3.4.3/bin/arm-linux-gcc
CFLAGS= -Wall -O

all: handler handler_base handler_sensor

clean:
	rm -rf *.o *~ handler handler_base handler_sensor
	
handler: handler.o network.o command.o router.o socket.o localization.o util.o packet_handler.o sensor.o
	$(CC) $(CFLAGS) -pthread -lm $^ -o $@
	
handler_sensor: handler_sensor.o network.o command.o router.o socket.o localization.o util.o packet_handler.o sensor.o
	$(CC) $(CFLAGS) -pthread -lm $^ -o $@
	
handler_base: handler_base.o network.o command.o router.o localization.o socket.o util.o packet_handler.o sensor.o
	$(CC) $(CFLAGS) -pthread -lm $^ -o $@
	
%.o: %.c
	$(CC) $(CFLAGS) -c $<
